Skip to content

fix: Add integrations tests for browser and node#4390

Merged
GordonSmith merged 1 commit into
hpcc-systems:candidate-3.x.xfrom
GordonSmith:COPILOT_INSTRUCTIONS
Jun 20, 2025
Merged

fix: Add integrations tests for browser and node#4390
GordonSmith merged 1 commit into
hpcc-systems:candidate-3.x.xfrom
GordonSmith:COPILOT_INSTRUCTIONS

Conversation

@GordonSmith
Copy link
Copy Markdown
Member

@GordonSmith GordonSmith commented Jun 12, 2025

Checklist:

  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit message includes a "fixes" reference if appropriate.
    • The commit is signed.
  • The change has been fully tested:
    • I have viewed all related gallery items
    • I have viewed all related dermatology items
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised new issues to address them separately

Testing:

@GordonSmith GordonSmith requested a review from Copilot June 12, 2025 13:35

This comment was marked as outdated.

@GordonSmith GordonSmith requested a review from jeclrsg June 12, 2025 13:35
Copy link
Copy Markdown
Contributor

@jeclrsg jeclrsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good chunk (maybe all) of that content in this instructions.md seems like it'd be useful to have under the "Developer Zone" heading of the repo's readme?

@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch from 416e67d to 859ddc9 Compare June 13, 2025 08:20
@GordonSmith GordonSmith requested review from Copilot and jeclrsg June 13, 2025 08:22

This comment was marked as outdated.

@GordonSmith
Copy link
Copy Markdown
Member Author

@jeclrsg - I let copilot redo the main readme and added some "integration" tests that checks the NodeJS CJS / ESM + Browser UMD / ESM loading...

@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch from 859ddc9 to 77364da Compare June 13, 2025 10:43
Copy link
Copy Markdown
Contributor

@jeclrsg jeclrsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GordonSmith noticed a few formatting issues in the tests. also, the GH actions was noting some issues with a couple of timeouts on the beforeEach that were importing things

Comment thread tests/node-esm/dataflow.node.spec.js Outdated
Comment thread tests/node-esm/dataflow.node.spec.js Outdated
Comment thread tests/node-esm/dataflow.node.spec.js Outdated
Comment thread tests/node-esm/dataflow.node.spec.js Outdated
Comment thread tests/node-esm/comms.node.spec.js Outdated
Comment thread tests/node-cjs/dataflow.node.spec.js Outdated
Comment thread tests/node-cjs/dataflow.node.spec.js Outdated
Comment thread tests/node-cjs/dataflow.node.spec.js Outdated
Comment thread tests/node-cjs/comms.node.spec.js Outdated
Comment thread tests/README.md Outdated
@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch 4 times, most recently from 361e6e9 to 77c4a9e Compare June 16, 2025 15:44
@GordonSmith GordonSmith changed the title fix: Minor export issues fix: Add integrations tests for browser and node Jun 16, 2025
@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch 3 times, most recently from 09661de to 764f596 Compare June 18, 2025 13:54
Comment thread packages/comms/vite.config.ts Outdated
@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch 2 times, most recently from b00fdf5 to dfdb6c3 Compare June 19, 2025 14:52
@GordonSmith GordonSmith requested review from Copilot and jeclrsg June 19, 2025 14:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds integration tests for browser and Node.js environments for the @hpcc-js packages while also updating configuration files, documentation, and workflows to support multiple module formats. Key changes include:

  • Addition of browser UMD and ESM test suites (including updated Vitest configs and tsconfig files) for the @hpcc-js/util, @hpcc-js/dataflow, and @hpcc-js/comms packages.
  • Updates to package.json scripts and dependency declarations (including adjustments in the comms package) to support expanded testing.
  • Enhancements to documentation (README files and GitHub workflow configuration) to clarify usage and integration testing.

Reviewed Changes

Copilot reviewed 20 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/browser-umd/.ts, tests/browser-esm/.ts New test suites for both UMD and ESM browser environments
packages/markdown-it-plugins/tests/* Minor path update in fetch() call
packages/comms/package.json Dependency declarations updated (moved some deps into devDependencies)
package.json Updated scripts (including uninstall command) and workspaces
README.md (root and tests/) Extensive documentation updates for setup, testing, and usage
GitHub workflows (.github/workflows/release-please.yml) Added extra test commands for browser and Node.js ESM/CJS tests
.github/instructions/general.instructions.md New internal instructions for project standards and practices
Comments suppressed due to low confidence (2)

packages/comms/package.json:89

  • The dependencies d3-array, d3-format, d3-time-format, data-uri-to-buffer, safe-buffer, and tmp have been moved from dependencies to devDependencies. Please confirm that these modules are not required at runtime in production, as this change could lead to missing modules when the package is used.
        "d3-array": "^1",

package.json:15

  • The uninstall script now removes package-lock files and node_modules from several locations. Please verify that these removals are intentional and do not delete lock files that may be needed for proper dependency management in your environments.
    "uninstall": "lerna clean && rimraf --glob packages/**/node_modules packages/**/package-lock.json demos/**/node_modules demos/**/package-lock.json tests/**/node_modules package-lock.json tests/**/package-lock.json node_modules",

Copy link
Copy Markdown
Contributor

@jeclrsg jeclrsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GordonSmith noticed a few more nitpick formatting issues. And I don't understand those tests about "different types of exports"?

Comment thread tests/browser-esm/comms.browser.spec.ts Outdated
Comment thread tests/node-cjs/comms.node.spec.ts Outdated
Comment thread tests/node-cjs/dataflow.node.spec.ts Outdated
Comment thread tests/browser-umd/comms.browser.spec.ts Outdated
Comment thread tests/browser-umd/vitest.config.ts Outdated
Comment thread tests/node-cjs/dataflow.node.spec.ts Outdated
Comment thread tests/node-cjs/dataflow.node.spec.ts Outdated
Comment thread tests/node-cjs/vitest.config.ts Outdated
Comment thread tests/node-esm/comms.node.spec.ts Outdated
@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch from dfdb6c3 to af4ceac Compare June 19, 2025 16:12
@GordonSmith GordonSmith requested a review from jeclrsg June 19, 2025 16:13
Copy link
Copy Markdown
Contributor

@jeclrsg jeclrsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GordonSmith just one last nitpick where those test instances are missing whitespace between them

Comment thread tests/browser-esm/comms.browser.spec.ts Outdated
expect(connection).toBeDefined();
expect(wuService).toBeDefined();
expect(dfuService).toBeDefined();
}); it("should work in browser environment", async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess I missed it earlier, but last one of these I think?

Resolve minor export issues

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
@GordonSmith GordonSmith force-pushed the COPILOT_INSTRUCTIONS branch from af4ceac to f09add9 Compare June 19, 2025 17:22
@GordonSmith GordonSmith requested a review from jeclrsg June 19, 2025 17:26
@GordonSmith GordonSmith merged commit e91cd0d into hpcc-systems:candidate-3.x.x Jun 20, 2025
1 check passed
@GordonSmith GordonSmith deleted the COPILOT_INSTRUCTIONS branch June 20, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants